/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ace.game.entity;

import ace.game.Sprite;
import javax.microedition.lcdui.Graphics;

/**
 *
 * @author Hallucinogen
 */
public abstract class LivingEntity extends Entity {
    public int getHealth()      {	return mHealth;	}
	public boolean isAlive()    {	return mAlive;	}

    public void damage(int damage) {
        mHealth -= damage;
        if (mHealth <= 0) {
            kill();
        }
    }

    public void kill() {
        mAlive  = false;
        mHealth = 0;
    }

	protected boolean	mAlive;
	protected int		mHealth;
}
